package com.ylr.user.framework.feign.fallback;

import com.ylr.base.common.dto.PageDto;
import com.ylr.user.common.dto.user.UserDto;
import com.ylr.base.common.po.user.UserPo;
import com.ylr.base.common.tool.Result;
import com.ylr.user.common.vo.user.UserFormVo;
import com.ylr.user.common.vo.user.UserVo;
import com.ylr.user.framework.feign.YuUserBaseClient;
import com.ylr.base.common.dto.NameValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-12 11:29:07
 * className: YuUserClientFallback
 * version: 1.0
 * description:
 */
public class YuUserClientFallback implements YuUserBaseClient {

    private static final Logger log = LoggerFactory.getLogger(YuUserClientFallback.class);

    @Override
    public Result<UserPo> auth(String userId, String module, String channel, String uri) {
        log.warn("user模块 => 用户权限校验，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<Long> saveUser(UserVo userVo) {
        log.warn("user模块 => 保存用户接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<PageDto<UserDto>> pageUserList(UserFormVo userFormVo) {
        log.warn("user模块 => 分页查询用户接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<UserDto> getUser(Long id) {
        log.warn("user模块 => 获取用户接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<List<UserDto>> getUserList(List<Long> userIdList) {
        log.warn("user模块 => 批量获取用户接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<Map<Long, String>> getUsernameMap(Set<Long> userIdSet) {
        log.warn("user模块 => 获取用户名字映射接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<List<NameValue<String>>> getUsernameList(Set<Long> userIdSet) {
        log.warn("user模块 => 获取用户名字列表接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<Object> updateUserBase(UserVo userVo) {
        log.warn("user模块 => 修改用户接口，请求失败回调");
        return Result.fail();
    }

    @Override
    public Result<Integer> deleteUser(List<Long> idList) {
        log.warn("user模块 => 删除用户接口，请求失败回调");
        return Result.fail();
    }


}
